home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / AlgoWaveTableObject.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  4.9 KB  |  133 lines  |  [TEXT/KAHL]

  1. /* AlgoWaveTableObject.h */
  2.  
  3. #ifndef Included_AlgoWaveTableObject_h
  4. #define Included_AlgoWaveTableObject_h
  5.  
  6. /* AlgoWaveTableObject module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* SampleConsts */
  12. /* AlgoWaveTableList */
  13. /* Memory */
  14. /* DataMunging */
  15. /* CodeCenter */
  16. /* PcodeStack */
  17. /* PcodeSystem */
  18. /* FixedPoint */
  19. /* MainWindowStuff */
  20. /* Alert */
  21. /* Numbers */
  22. /* AlgoWaveTableWindow */
  23. /* WaveTableStorage */
  24. /* CompilerRoot */
  25. /* FunctionCode */
  26. /* MainWindowStuff */
  27. /* BufferedFileInput */
  28. /* BufferedFileOutput */
  29.  
  30. #include "SampleConsts.h"
  31. #include "MainWindowStuff.h"
  32.  
  33. struct AlgoWaveTableObjectRec;
  34. typedef struct AlgoWaveTableObjectRec AlgoWaveTableObjectRec;
  35.  
  36. /* forward declarations */
  37. struct CodeCenterRec;
  38. struct MainWindowRec;
  39. struct AlgoWaveTableListRec;
  40. struct BufferedInputRec;
  41. struct BufferedOutputRec;
  42.  
  43. /* allocate and create a new algorithmic wave table */
  44. AlgoWaveTableObjectRec*    NewAlgoWaveTableObject(struct CodeCenterRec* CodeCenter,
  45.                                                 struct MainWindowRec* MainWindow,
  46.                                                 struct AlgoWaveTableListRec* AlgoWaveTableList);
  47.  
  48. /* dispose of all data structures associated with wave table */
  49. void                                    DisposeAlgoWaveTableObject(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  50.  
  51. /* find out if any changes have been made to it */
  52. MyBoolean                            HasAlgoWaveTableObjectBeenModified(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  53.  
  54. /* rebuild the wave table and return True if successful */
  55. MyBoolean                            AlgoWaveTableObjectBuild(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  56.  
  57. /* remove the wave table data */
  58. void                                    AlgoWaveTableObjectUnbuild(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  59.  
  60. /* rebuild the wave table if it hasn't been built and return success flag */
  61. MyBoolean                            AlgoWaveTableObjectMakeUpToDate(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  62.  
  63. /* get a copy of the name of this object */
  64. char*                                    AlgoWaveTableObjectGetNameCopy(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  65.  
  66. /* install a new name on the object.  the object becomes owner of the name, so */
  67. /* the caller should not dispose of it. */
  68. void                                    AlgoWaveTableObjectNewName(AlgoWaveTableObjectRec* AlgoWaveTableObj,
  69.                                                 char* Name);
  70.  
  71. /* get a copy of the formula that computes the algorithmic wave table */
  72. char*                                    AlgoWaveTableObjectGetFormulaCopy(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  73.  
  74. /* install a new formula for the algorithmic wave table.  the object becomes the */
  75. /* owner of the memory block so the caller should not dispose of it. */
  76. void                                    AlgoWaveTableObjectNewFormula(AlgoWaveTableObjectRec* AlgoWaveTableObj,
  77.                                                 char* Formula);
  78.  
  79. /* find out how many bits are in each sample frame */
  80. NumBitsType                        AlgoWaveTableObjectGetNumBits(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  81.  
  82. /* install a new number of bits in the object. */
  83. void                                    AlgoWaveTableObjectPutNumBits(AlgoWaveTableObjectRec* AlgoWaveTableObj,
  84.                                                 NumBitsType NewNumBits);
  85.  
  86. /* find out how many frames there are per table */
  87. long                                    AlgoWaveTableObjectGetNumTables(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  88.  
  89. /* set the number of tables in the wave table */
  90. void                                    AlgoWaveTableObjectPutNumTables(AlgoWaveTableObjectRec* AlgoWaveTableObj,
  91.                                                 long NumTables);
  92.  
  93. /* get number of frames in each table */
  94. long                                    AlgoWaveTableObjectGetNumFrames(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  95.  
  96. /* set the number of frames in each table */
  97. void                                    AlgoWaveTableObjectPutNumFrames(AlgoWaveTableObjectRec* AlgoWaveTableObj,
  98.                                                 long NumFrames);
  99.  
  100. /* get a raw slice of data from the wave table.  if the wave table is modified, */
  101. /* this pointer becomes invalid. */
  102. char*                                    AlgoWaveTableObjectGetRawSlice(AlgoWaveTableObjectRec* AlgoWaveTableObj,
  103.                                                 long AlgoWaveTableIndex);
  104.  
  105. /* make the wave table open it's editor window */
  106. MyBoolean                            AlgoWaveTableObjectOpenWindow(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  107.  
  108. /* notify the object that the editor window is closing.  the object should */
  109. /* not take any action. */
  110. void                                    AlgoWaveTableObjectClosingWindowNotify(
  111.                                                 AlgoWaveTableObjectRec* AlgoWaveTableObj,
  112.                                                 short NewX, short NewY, short NewWidth, short NewHeight);
  113.  
  114. /* the document's name has changed, so we need to update the window */
  115. void                                    AlgoWaveTableObjectGlobalNameChange(AlgoWaveTableObjectRec*
  116.                                                 AlgoWaveTableObj, char* NewFilename);
  117.  
  118. /* read in an object from the file. */
  119. FileLoadingErrors            AlgoWaveTableObjectNewFromFile(AlgoWaveTableObjectRec** ObjectOut,
  120.                                                 struct BufferedInputRec* Input, struct CodeCenterRec* CodeCenter,
  121.                                                 struct MainWindowRec* MainWindow,
  122.                                                 struct AlgoWaveTableListRec* AlgoWaveTableList);
  123.  
  124. /* write the object out to the file. */
  125. FileLoadingErrors            AlgoWaveTableObjectWriteDataOut(
  126.                                                 AlgoWaveTableObjectRec* AlgoWaveTableObj,
  127.                                                 struct BufferedOutputRec* Output);
  128.  
  129. /* mark algorithmic wave table object as saved */
  130. void                                    AlgoWaveTableObjectMarkAsSaved(AlgoWaveTableObjectRec* AlgoWaveTableObj);
  131.  
  132. #endif
  133.